<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>emfapisgeneration</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.kitalpha.doc/html/common/style/style.css"/>
	</head>
	<body>
		<h1 id="Generating_extensible_EMF_APIs"><center> Generating extensible EMF APIs </center></h1>
		<p>Once eMDE extensions defined in an Ecore model, the next step is to generate EMF APIs in order to start to use it. </p>
		<p>Kitalpha provides a customized EMF generation that takes into account the added EAnnotations. That generation can be triggered from a generation chain. More information on generation chains can be found on the 
			<a href="https://www.eclipse.org/egf/" target="_blank">EGF</a> web page. 
		</p>
		<h2 id="Content">Content</h2>
		<ol>
			<li>
				<a href="#Creating_a_Generation_Chain">Creating a Generation Chain</a>
			</li>
			<li>
				<a href="#Adding_the_Kitalpha_eMDE_EMF_Generation">Adding the Kitalpha eMDE EMF Generation</a>
			</li>
			<li>
				<a href="#Lunching_the_generation">Lunching the generation</a>
			</li>
		</ol>
		<h2 id="Creating_a_Generation_Chain">Creating a Generation Chain</h2>
		<p>A generation chain can be created by the 
			<i>New wizard</i>. The first page of this wizard asks end-user for a file name and file location. The next page displays a list of available extension of the generation chain if an Ecore model was selected in the workspace (see picture bellow), or an empty list otherwise. In the last case, the add button (
			<img width="15" border="0" src="../img/genchain_wizard_add_button.png"/>)can be used to select an Ecore model from the workspace, the file system or the platform.  
		</p>
		<p>
			<div class="thumb">
				<div class="thumbinner" style="width:502px;">
					<a href="../img/genchain_emde_emf_generation_wizardpage.png" class="image">
						<img class="thumbimage" width="500" border="0" src="../img/genchain_emde_emf_generation_wizardpage.png"/>
					</a>
				</div>
			</div> 
		</p>
		<p>The picture above shows the different properties of the 
			<b>Kitalpha eMDE EMF Generation</b>. End-users can customize them from the wizard or from the Generation Chain editor.
		</p>
		<p>The 
			<i>Finish</i> allows to end the wizard and create a generation chain model in the location chosen in the first page of the wizard. The picture bellow shows the created generation chain.
		</p>
		<p>
			<div class="thumb">
				<div class="thumbinner" style="width:502px;">
					<a href="../img/genchain_example.png" class="image">
						<img class="thumbimage" width="500" border="0" src="../img/genchain_example.png"/>
					</a>
				</div>
			</div> 
		</p>
		<h2 id="Adding_the_Kitalpha_eMDE_EMF_Generation">Adding the Kitalpha eMDE EMF Generation</h2>
		<p>If a generation chain exists and one want to add 
			<b>Kitalpha eMDE EMF Generation</b> to it, the tooling provided by the generation chain editor can be used. 
		</p>
		<p>The following picture show the contextual menu allowing to add extensions to a generation chain element. The surrounded menu item is the one used to create an 
			<b>Kitalpha eMDE EMF Generation</b>.
		</p>
		<p>
			<div class="thumb">
				<div class="thumbinner" style="width:502px;">
					<a href="../img/genchain_add_emde_emf_gen.png" class="image">
						<img class="thumbimage" width="500" border="0" src="../img/genchain_add_emde_emf_gen.png"/>
					</a>
				</div>
			</div> 
		</p>
		<p>One the 
			<b>Kitalpha eMDE EMF Generation</b> is added to the generation chain, its properties can be changed thanks to the Property View.
		</p>
		<p><blockquote>
			The 
			<i>Model Path</i> property value should follow the following format: /
			<i>PLUGIN_NAME</i>/
			<i>PATH_TO_ECORE_MODEL</i>/
			<i>ECORE_MODEL_NAME</i>.ecore .
</blockquote>
		</p>
		<h2 id="Lunching_the_generation">Lunching the generation</h2>
		<p>The generation chain can be run from two menus:</p>
		<ol>
			<li>Contextual menu of the project explorer by right clicking on the generation chain file (see first picture below).</li>
			<li>Contextual menu of the generation chain editor  by right clicking on the generation chain model element (see second picture below).</li>
		</ol>
		<p>
			<div class="thumb">
				<div class="thumbinner" style="width:502px;">
					<a href="../img/genchain_run_explorer.png" class="image">
						<img class="thumbimage" width="500" border="0" src="../img/genchain_run_explorer.png"/>
					</a>
				</div>
			</div> 
		</p>
		<p>
			<div class="thumb">
				<div class="thumbinner" style="width:502px;">
					<a href="../img/genchain_run_editor.png" class="image">
						<img class="thumbimage" width="500" border="0" src="../img/genchain_run_editor.png"/>
					</a>
				</div>
			</div> 
		</p>
	</body>
</html>